package com.kkb.hbase2hdfs;

import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.mapreduce.TableMapper;
import org.apache.hadoop.hbase.util.Bytes;

import java.io.IOException;

/**
 * 需求（上）：读取上节创建的表myUser内容(f1,f2 列族)
 * k1  ImmutableBytesWritable   --> Rowkey
 * v1  Result
 * k2  keyout    ImmutableBytesWritable
 * v2  valueOut  Result
 */
public class HBaseReadMapper2 extends TableMapper<ImmutableBytesWritable, Result> {

    @Override
    protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException {
        context.write(key, value);
    }
}
